﻿@using EC.Entity.Response.DepositRecord
@using EC.Entity.Enum

@model EC.Entity.PagedList<DepositRecordQueryResponse>
<div class="data-body data-scroll">
    <div class="data-view">
        <div class="data-div-view table-responsive">
            <table class="table table-hover table-striped table-bordered">
                <thead>
                    <tr>
                        <th class="t_l wd120">系统编号</th>
                        <th class="t_l wd100">银行名称</th>
                        <th class="t_l wd100">银行姓名</th>
                        <th class="t_l wd150">银行卡号</th>
                        <th class="t_l wd75">存款金额</th>
                        <th class="t_l wd150">存款卡号</th>
                        <th class="t_l wd100">存款时间</th>
                        <th class="t_l wd120">交易类型</th>
                        <th class="t_l wd100">创建时间</th>
                    </tr>
                </thead>
                <tbody>
                    @if (Model != null && Model.TData != null && Model.TData.Any())
                    {
                        foreach (var item in (IEnumerable<DepositRecordQueryResponse>)Model.TData)
                        {
                    <tr>
                        <td class="t_l wd120">@(item.Id)</td>
                        <td class="t_l wd100">@(item.ClientBankName)</td>
                        <td class="t_l wd100">@(item.ClientCardName)</td>
                        <td class="t_l wd150">@(item.ClientCardNumber)</td>
                        <td class="t_r wd75 red bold">@(item.DepositAmount)</td>
                        <td class="t_l wd150">@(item.DepositCardNumber)</td>
                        <td class="t_l wd100">
                            @{ 
                                if (item.DepositDate.HasValue)
                                {
                                    <span>@(item.DepositDate.Value.ToString("MM-dd HH:mm:ss"))</span>
                                }
                            }
                            
                        </td>
                        <td class="t_l wd120">
                            @switch (item.Transtype)
                            {
                                case (sbyte)TransType.网银转账:
                                    <span>网银转账</span>
                                    break;
                                case (sbyte)TransType.支付宝转账:
                                    <span>支付宝转账</span>
                                    break;
                                case (sbyte)TransType.微信转账:
                                    <span>微信转账</span>
                                    break;
                                case (sbyte)TransType.云闪付:
                                    <span>云闪付</span>
                                    break;
                                default:
                                    <span>Unknown</span>
                                    break;
                            }
                        </td>
                        <td class="t_l wd100">@(item.CreatedDate.ToString("MM-dd HH:mm:ss"))</td>
                    </tr>
                        }
                    }
                    else
                    {
                        <tr>
                            <td colspan="11" class="t_c">暂无记录</td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>
    </div>
</div>
<!-- 必要的分页参数设置 -->
<input type="hidden" id="TotalCount" value="@(Model != null ? Model.TotalCount : 0)" />